!
function(a, b) {
	var c, d, e, f, g, h, i;
	a.util.namespace("$.easyui"),
	a.easyui.getTopEasyuiMessager = function() {
		return a.util.isTopMost ? a.messager: a.util.$ && a.util.$.messager ? a.util.$.messager: a.messager
	},
	a.easyui.messager = a.easyui.getTopEasyuiMessager(),
	a.easyui.getTopEasyuiTooltip = function() {
		return a.util.isTopMost ? a.fn.tooltip: a.util.$ && a.util.$.fn && a.util.$.fn.tooltip ? a.util.$.fn.tooltip: a.fn.tooltip
	},
	a.easyui.tooltip = a.fn.tooltip,
	a.easyui.tooltip.init = function(b, c) {
		var d = a(b);
		d.mouseover(function() {
			d.tooltip(a.extend({
				trackMouse: !0
			},
			c, {
				onHide: function() {
					a.isFunction(c.onHide) && c.onHide.apply(this, arguments),
					d.tooltip("destroy")
				}
			})).tooltip("show")
		})
	},
	c = {
		error: "messager-error",
		info: "messager-info",
		question: "messager-question",
		warning: "messager-warning"
	},
	d = a.messager.show,
	e = a.messager.alert,
	f = a.messager.confirm,
	g = a.messager.prompt,
	h = {
		title: "操作提醒",
		confirm: "您确认要进行该操作？",
		prompt: "请输入相应内容：",
		icon: "info",
		loading: "正在加载，请稍等..."
	},
	a.messager.show = function(b) {
		var f, g, h, i, e = a.util.isString(b) || a.util.isBoolean(b) || a.isNumeric(b);
		return e ? 1 == arguments.length ? a.messager.show({
			msg: String(b)
		}) : a.messager.show({
			title: b,
			msg: arguments[1],
			icon: arguments[2],
			position: arguments[3]
		}) : (f = a.extend({},
		a.messager.defaults, {
			title: "操作提醒",
			timeout: 4e3,
			showType: "slide"
		}), g = {
			topLeft: {
				showType: "show",
				right: "",
				left: 0,
				top: document.body.scrollTop + document.documentElement.scrollTop,
				bottom: ""
			},
			topCenter: {
				showType: "slide",
				right: "",
				top: document.body.scrollTop + document.documentElement.scrollTop,
				bottom: ""
			},
			topRight: {
				showType: "show",
				left: "",
				right: 0,
				top: document.body.scrollTop + document.documentElement.scrollTop,
				bottom: ""
			},
			centerLeft: {
				showType: "fade",
				left: 0,
				right: "",
				bottom: ""
			},
			center: {
				showType: "fade",
				right: "",
				bottom: ""
			},
			centerRight: {
				showType: "fade",
				left: "",
				right: 0,
				bottom: ""
			},
			bottomLeft: {
				showType: "show",
				left: 0,
				right: "",
				top: "",
				bottom: -document.body.scrollTop - document.documentElement.scrollTop
			},
			bottomCenter: {
				showType: "slide",
				right: "",
				top: "",
				bottom: -document.body.scrollTop - document.documentElement.scrollTop
			},
			bottomRight: {
				showType: "show",
				left: "",
				right: 0,
				top: "",
				bottom: -document.body.scrollTop - document.documentElement.scrollTop
			}
		},
		h = a.extend({},
		f, b), h.style = g[b.position] ? g[b.position] : g.topCenter, h.style.showType && (h.showType = h.style.showType), i = c[h.icon] ? c[h.icon] : c.info, h.msg = "<div class='messager-icon " + i + "'></div>" + "<div>" + h.msg + "</div>", d(h))
	},
	a.union(a.messager.show, d),
	a.messager.alert = function() {
		return 1 == arguments.length ? e(h.title, arguments[0], h.icon) : 2 == arguments.length ? a.isFunction(arguments[1]) ? e(h.title, arguments[0], h.icon, arguments[1]) : arguments[1] in c ? e(h.title, arguments[0], arguments[1]) : e.apply(this, arguments) : 3 == arguments.length ? a.isFunction(arguments[2]) ? arguments[1] in c ? e(h.title, arguments[0], arguments[1], arguments[2]) : e(arguments[0], arguments[1], h.icon, arguments[2]) : e.apply(this, arguments) : e.apply(this, arguments)
	},
	a.messager.confirm = function() {
		return 1 == arguments.length ? a.isFunction(arguments[0]) ? f(h.title, h.confirm, arguments[0]) : f(h.title, arguments[0]) : 2 == arguments.length ? a.isFunction(arguments[1]) ? f(h.title, arguments[0], arguments[1]) : f(arguments[0], arguments[1]) : f.apply(this, arguments)
	},
	a.messager.solicit = function() {
		var k, f = a.extend({},
		2 == arguments.length ? {
			title: h.title,
			msg: arguments[0],
			fn: arguments[1]
		}: {
			title: arguments[0],
			msg: arguments[1],
			fn: arguments[2]
		}),
		g = a.messager.confirm(f.title, f.msg, f.fn),
		i = g.window("options"),
		j = i.onClose;
		return i.onClose = function() {
			a.isFunction(j) && j.apply(this, arguments),
			a.isFunction(f.fn) && f.fn.call(this, b)
		},
		k = g.find(">div.messager-button").empty(),
		a("<a></a>").linkbutton({
			text: "是"
		}).css("margin-left", "10px").click(function() {
			i.onClose = j,
			g.window("close"),
			a.isFunction(f.fn) && f.fn.call(this, !0)
		}).appendTo(k),
		a("<a></a>").linkbutton({
			text: "否"
		}).css("margin-left", "10px").click(function() {
			i.onClose = j,
			g.window("close"),
			a.isFunction(f.fn) && f.fn.call(this, !1)
		}).appendTo(k),
		a("<a></a>").linkbutton({
			text: "取消"
		}).css("margin-left", "10px").click(function() {
			i.onClose = j,
			g.window("close"),
			a.isFunction(f.fn) && f.fn.call(this, b)
		}).appendTo(k),
		g
	},
	a.messager.prompt = function() {
		return 1 == arguments.length ? a.isFunction(arguments[0]) ? g(h.title, h.prompt, arguments[0]) : g(h.title, h.prompt) : 2 == arguments.length ? a.isFunction(arguments[1]) ? g(h.title, arguments[0], arguments[1]) : g(arguments[0], arguments[1]) : g.apply(this, arguments)
	},
	a.easyui.loading = function(b) {
		var d, e, f, g, i, j, c = {
			msg: h.loading,
			locale: "body",
			topMost: !1
		};
		return b = b || {},
		a.extend(c, b),
		d = c.topMost ? a.util.$: a,
		e = d(c.locale),
		f = e.children().map(function() {
			var b = a(this).css("z-index");
			return a.isNumeric(b) ? parseInt(b) : 0
		}),
		g = a.array.max(f),
		e.addClass("mask-container"),
		i = d("<div></div>").addClass("datagrid-mask").css({
			display: "block",
			"z-index": ++g
		}).appendTo(e),
		j = d("<div></div>").addClass("datagrid-mask-msg").css({
			display: "block",
			left: "50%",
			"z-index": ++g
		}).html(c.msg).appendTo(e),
		j.css("marginLeft", -j.outerWidth() / 2),
		i.add(j)
	},
	a.easyui.loaded = function(b) {
		var e, d = {
			locale: "body",
			topMost: !1
		};
		1 == arguments.length && (a.isPlainObject(arguments[0]) ? a.extend(d, arguments[0]) : a.util.isBoolean(arguments[0]) ? d.topMost = arguments[0] : d.locale = arguments[0]),
		2 == arguments.length && (a.util.isBoolean(arguments[0]) ? a.extend(d, {
			locale: arguments[1],
			topMost: arguments[0]
		}) : a.extend(d, {
			locale: arguments[0],
			topMost: arguments[1]
		})),
		e = d.topMost ? a.util.$: a,
		b = e(d.locale),
		b.removeClass("mask-container"),
		b.children("div.datagrid-mask-msg,div.datagrid-mask").remove()
	},
	a.extend(a.fn.panel.defaults, {
		loadingMessage: h.loading
	}),
	a.extend(a.fn.window.defaults, {
		loadingMessage: h.loading
	}),
	a.extend(a.fn.dialog.defaults, {
		loadingMessage: h.loading
	}),
	a.extend(a.fn.combo.defaults, {
		missingMessage: a.fn.validatebox.defaults.missingMessage
	}),
	a.easyui.bindPageNestedFunc = function(b, c, d, e) {
		3 == arguments.length && (e = d, d = "jquery"),
		4 != arguments.length || d || (d = "jquery"),
		a(document).unbind("." + c).bind(b + "." + c,
		function(a) {
			var b = function(b) {
				e.call(b, b, a)
			},
			c = function(a) {
				var e = a.parent;
				try {
					a != e && e.jQuery && e.jQuery.parser && e.jQuery.parser.plugins && e.jQuery.fn && e.jQuery.fn[d] && (b(e), c(e))
				} catch(f) {}
			},
			f = function(a) {
				var c = a.jQuery;
				c("iframe,iframe").each(function() {
					try {
						this.contentWindow && c.util.isObject(this.contentWindow.document) && this.contentWindow.jQuery && this.contentWindow.jQuery.parser && this.contentWindow.jQuery.parser.plugins && this.contentWindow.jQuery.fn && this.contentWindow.jQuery.fn[d] && (b(this.contentWindow), f(this.contentWindow))
					} catch(a) {}
				})
			},
			g = function(a) {
				b(a),
				c(a),
				f(a)
			};
			g(window)
		})
	},
	a.easyui.ajaxError = function(b) {
		return arguments.length ? (a.fn.form.defaults.onLoadError = b, a.fn.combobox.defaults.onLoadError = b, a.fn.combotree.defaults.onLoadError = b, a.fn.combogrid.defaults.onLoadError = b, a.fn.datagrid.defaults.onLoadError = b, a.fn.propertygrid.defaults.onLoadError = b, a.fn.tree.defaults.onLoadError = b, a.fn.treegrid.defaults.onLoadError = b, a.ajaxSetup({
			error: b
		}), void 0) : a.fn.form.defaults.onLoadError
	},
	i = function(b) {
		var e, f, h, i, j;
		a.messager.progress("close"),
		a.easyui.messager != a.messager && a.easyui.messager.progress("close"),
		e = b && !a.string.isNullOrWhiteSpace(b.responseText) ? "如果该问题重复出现，请联系您的系统管理员并反馈该故障。<br />错误号：" + b.status + "(" + b.statusText + ")；<hr />" + b.responseText: "系统出现了一个未指明的错误，如果该问题重复出现，请联系您的系统管理员并反馈该故障。",
		f = a.easyui.messager.alert("错误提醒", e, "error"),
		f.window("options"),
		h = f.window("panel"),
		i = h.outerWidth(),
		j = h.outerHeight(),
		(i > 800 || j > 800) && f.window("resize", {
			width: i > 800 ? 800 : i,
			height: j > 800 ? 800 : j
		}),
		f.window("center")
	},
	a.easyui.ajaxError(i),
	a.ajaxSetup({
		dataFilter: function(b, c) {
			return a.util.isString(c) && "json" == c.toLowerCase(c) ? a.string.toJSONString(b) : b
		}
	}),
	a.extend({
		isEasyUI: function(b, c) {
			var d, e;
			return a.array.contains(a.parser.plugins, c) || a.error(a.string.format("传入的参数 pluginName: {0} 不是 easyui 插件名。")),
			d = a(b),
			d.length ? (e = a.data(d[0], c), e && e.options ? !0 : !1) : !1
		}
	}),
	a.fn.extend({
		isEasyUI: function(b) {
			return a.isEasyUI(this, b)
		},
		currentPagination: function() {
			for (var b = this.closest(".pagination"); b.length && !a.data(b[0], "pagination");) b = b.parent().closest(".pagination");
			return b
		},
		currentProgressbar: function() {
			for (var b = this.closest(".progressbar"); b.length && !a.data(b[0], "progressbar");) b = b.parent().closest(".progressbar");
			return b
		},
		currentPanel: function() {
			for (var b = this.closest(".panel-body"); b.length && !a.data(b[0], "panel");) b = b.parent().closest(".panel-body");
			return b
		},
		currentTabPanel: function() {
			for (var b = this.closest(".panel-body"), c = b.parent(), d = c.parent(), e = d.parent(); b.length && !(a.data(b[0], "panel") && c.hasClass("panel") && d.hasClass("tabs-panels") && e.hasClass("tabs-container"));) b = b.parent().closest(".panel-body"),
			c = b.parent(),
			d = c.parent(),
			e = d.parent();
			return b
		},
		currentTabIndex: function() {
			var a = this.currentTabPanel();
			return a.length ? a.panel("panel").index() : -1
		},
		currentTabs: function() {
			for (var b = this.closest(".tabs-container"); b.length && !a.data(b[0], "tabs");) b = b.parent().closest(".tabs-container");
			return b
		},
		currentAccordion: function() {
			for (var b = this.closest(".accordion"); b.length && !a.data(b[0], "accordion");) b = b.parent().closest(".accordion");
			return b
		},
		currentAccPanel: function() {
			for (var b = this.closest(".panel-body"), c = b.parent(), d = panels.parent(); b.length && !(a.data(b[0], "panel") && c.hasClass("panel") && d.hasClass("accordion") && a.data(d[0], "accordion"));) b = b.parent().closest(".panel-body"),
			c = b.parent(),
			d = panels.parent();
			return b
		},
		currentLayout: function() {
			for (var b = this.closest(".layout"); b.length && !a.data(b[0], "layout");) b = b.closest(".layout");
			return b
		},
		currentRegion: function() {
			for (var b = this.closest(".panel.layout-panel"), c = b.parent(), d = b.children(".panel-body"); b.length && (!c.hasClass("layout") || !a.data(d[0], "panel"));) b = b.parent().closest(".panel.layout-panel"),
			c = b.parent(),
			d = b.children(".panel-body");
			return d
		},
		currentLinkbutton: function() {
			for (var b = this.closest(".l-btn"); b.length && !a.data(b[0], "linkbutton");) b = b.parent().closest(".layout");
			return b
		},
		currentCalendar: function() {
			for (var b = this.closest(".calendar"); b.length && !a.data(b[0], "calendar");) b = b.parent().closest(".calendar");
			return b
		},
		currentWindow: function() {
			for (var b = this.closest(".panel-body.window-body"); b.length && !a.data(b[0], "window");) b = b.parent().closest(".panel-body.window-body");
			return b
		},
		currentDialog: function() {
			for (var b = this.closest(".panel-body.window-body"); b.length && !a.data(b[0], "dialog");) b = b.parent().closest(".panel-body.window-body");
			return b
		},
		currentDatagrid: function() {
			for (var b = this.closest(".datagrid-wrap.panel-body"), c = b.find(">.datagrid-view>:eq(2)"); b.length && !a.data(c[0], "datagrid");) b = b.parent().closest(".datagrid-wrap.panel-body"),
			c = b.find(">.datagrid-view>:eq(2)");
			return c
		},
		currentPropertygrid: function() {
			for (var b = this.closest(".datagrid-wrap.panel-body"), c = b.find(">.datagrid-view>:eq(2)"); b.length && !a.data(c[0], "propertygrid");) b = b.parent().closest(".datagrid-wrap.panel-body"),
			c = b.find(">.datagrid-view>:eq(2)");
			return c
		},
		currentTree: function() {
			for (var b = this.closest(".tree"); b.length && !a.data(b[0], "tree");) b = b.parent().closest(".tree");
			return b
		},
		currentTreegrid: function() {
			for (var b = this.closest(".datagrid-wrap.panel-body"), c = b.find(">.datagrid-view>:eq(2)"); b.length && !a.data(c[0], "treegrid");) b = b.parent().closest(".datagrid-wrap.panel-body"),
			c = b.find(">.datagrid-view>:eq(2)");
			return c
		}
	})
} (jQuery);